<template>
	<view v-if="showPage">
		<view class="information">
			<view class="information_item">
				<view>
					<text>姓名</text>
				</view>
				<view>
					<text>{{Information.name}}</text>
				</view>
			</view>
			<view class="information_item">
				<view>
					<text>证件</text>
				</view>
				<view>
					<text>{{IDtext}}</text>
				</view>				
			</view>
			<view class="information_item">
				<view>
					<text>证件号码</text>
				</view>
				<view>
					<text>{{Information.IDNumber}}</text>
				</view>				
			</view>
			<view class="information_item">
				<view>
					<text>公司名称</text>
				</view>
				<view>
					<text>{{Information.companyName}}</text>
				</view>
			</view>
			<view class="information_item">
				<view>
					<text>营业执照</text>
				</view>
				<view>
					<image :src="Information.businessLicense" mode="widthFix" @click="previewImage"></image>
				</view>			
			</view>
		</view>
		<!-- 广告 -->
		<view class="AD">
			<text>技术支持：</text>
			<image src="../../../../static/images/log_03.png" style="width:30upx;height:24upx"></image>
			<text>掌邦科技</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				Information:{},
				IDNumber:"",
				IDType:"",
				companyName:"",
				name:"",
				IDtext:"身份证",
				showPage:false
			}
		},
		methods: {
			getInformation(){
				//数据加载提示框
				uni.showLoading({
					title: '拼命加载中',
					mask: true
				});
				let that=this;
				uni.request({
					url:this.$store.state.URL+"/merchant/merchant_audit_data/show_perfect",
					data:{
						token:this.$store.state.merchantToken,
					},
					method:"GET",
					success(res) {
						that.showPage=true
						uni.hideLoading();
						that.Information=res.data.data;
						if(that.Information.IDType=="1"){
							that.IDtext="身份证"
						}
					}
				})
			},
			//预览图片
			previewImage(){
				var imgSrc=[this.Information.businessLicense]
				uni.previewImage({
			      urls: imgSrc
			    });
			},
		},
		onLoad() {
			this.getInformation();
		}
	}
</script>

<style>
page{
	background:#F5F5F5;
}
.information{
	background:#fff;
	width:95%;
	margin:20upx auto;
	border-radius: 30upx;
	text-align: center;
	padding-top:30upx;
	padding-bottom:60upx;
}
.information .information_item{
	margin-top:40upx;
	display: flex;
	justify-content: flex-start;
}
.information_item view:nth-of-type(1){
	text-align: right;
	width:300upx;
	margin-right:60upx;
}
.information_item view:nth-of-type(2){
	text-align: left;
	width:350upx;
	text-overflow: ellipsis;
	overflow: hidden;
}
.information text:nth-of-type(1){
	font-size:30upx;
	color:#333333;
	font-weight: 500;
	display: inline-block;
}
.information text:nth-of-type(2){
	font-size:28upx;
	color:#333333;
}
.information image{
	display: inline-block;
	width:192upx;
	height:100%;
}
.AD{
 	  position: absolute;
 	  bottom: 0;
 	  left:50%;
 	  margin-left: -18%;
 	  margin-bottom:15upx ;
 }
 .AD text{
 	  font-size:20upx;
 	  color:#999;
 	  margin:0 10upx;
 }
</style>
